Optimal. Leaf size=85 \[ -\sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+\frac {1}{3} \tan ^3(x) \sqrt {a+b \cot ^2(x)}-\frac {(3 a-b) \tan (x) \sqrt {a+b \cot ^2(x)}}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3670, 475, 583, 12, 377, 203} \[ \frac {1}{3} \tan ^3(x) \sqrt {a+b \cot ^2(x)}-\sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-\frac {(3 a-b) \tan (x) \sqrt {a+b \cot ^2(x)}}{3 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 203
Rule 377
Rule 475
Rule 583
Rule 3670
Rubi steps
\begin {align*} \int \sqrt {a+b \cot ^2(x)} \tan ^4(x) \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x^2}}{x^4 \left (1+x^2\right )} \, dx,x,\cot (x)\right )\\ &=\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)-\frac {1}{3} \operatorname {Subst}\left (\int \frac {-3 a+b-2 b x^2}{x^2 \left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )\\ &=-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)+\frac {\operatorname {Subst}\left (\int -\frac {3 a (a-b)}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )}{3 a}\\ &=-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)+(-a+b) \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )\\ &=-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)+(-a+b) \operatorname {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )\\ &=-\sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.65, size = 174, normalized size = 2.05 \[ \frac {1}{3} \sin ^2(x) \tan ^3(x) \sqrt {a+b \cot ^2(x)} \left (\frac {b \cot ^2(x)}{a}+1\right ) \left (\frac {\csc ^2(x) \left (a-2 b \cot ^2(x)\right ) \left (\sqrt {\frac {(a-b) \cos ^2(x)}{a}} \sin ^{-1}\left (\sqrt {\frac {(a-b) \cos ^2(x)}{a}}\right )+\sqrt {\frac {b \cos ^2(x)}{a}+\sin ^2(x)}\right )}{\left (a+b \cot ^2(x)\right ) \sqrt {\frac {b \cos ^2(x)}{a}+\sin ^2(x)}}-\frac {4 (a-b) \cos ^2(x) \left (a+b \cot ^2(x)\right ) \, _2F_1\left (2,2;\frac {3}{2};\frac {(a-b) \cos ^2(x)}{a}\right )}{a^2}\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.59, size = 239, normalized size = 2.81 \[ \left [\frac {3 \, a \sqrt {-a + b} \log \left (-\frac {a^{2} \tan \relax (x)^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \relax (x)^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \relax (x)^{3} - {\left (a - 2 \, b\right )} \tan \relax (x)\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{\tan \relax (x)^{4} + 2 \, \tan \relax (x)^{2} + 1}\right ) + 4 \, {\left (a \tan \relax (x)^{3} - {\left (3 \, a - b\right )} \tan \relax (x)\right )} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{12 \, a}, -\frac {3 \, \sqrt {a - b} a \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)}{a \tan \relax (x)^{2} - a + 2 \, b}\right ) - 2 \, {\left (a \tan \relax (x)^{3} - {\left (3 \, a - b\right )} \tan \relax (x)\right )} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{6 \, a}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.25, size = 476, normalized size = 5.60 \[ -\frac {1}{6} \, {\left (3 \, \sqrt {-a + b} \log \left ({\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{2}\right ) - \frac {4 \, {\left (3 \, {\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{4} {\left (2 \, a - b\right )} \sqrt {-a + b} - 6 \, {\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{2} a^{2} \sqrt {-a + b} + {\left (4 \, a^{3} - a^{2} b\right )} \sqrt {-a + b}\right )}}{{\left ({\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{2} - a\right )}^{3}}\right )} \mathrm {sgn}\left (\sin \relax (x)\right ) + \frac {{\left (3 \, a^{2} \sqrt {-a + b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 9 \, a^{2} \sqrt {b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 15 \, a \sqrt {-a + b} b \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 21 \, a b^{\frac {3}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 12 \, \sqrt {-a + b} b^{2} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 12 \, b^{\frac {5}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 8 \, a^{2} \sqrt {-a + b} - 18 \, a^{2} \sqrt {b} - 24 \, a \sqrt {-a + b} b + 30 \, a b^{\frac {3}{2}} + 12 \, \sqrt {-a + b} b^{2} - 12 \, b^{\frac {5}{2}}\right )} \mathrm {sgn}\left (\sin \relax (x)\right )}{6 \, {\left (a^{2} + 3 \, a \sqrt {-a + b} \sqrt {b} - 5 \, a b - 4 \, \sqrt {-a + b} b^{\frac {3}{2}} + 4 \, b^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.77, size = 951, normalized size = 11.19 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \cot \relax (x)^{2} + a} \tan \relax (x)^{4}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\relax (x)}^4\,\sqrt {b\,{\mathrm {cot}\relax (x)}^2+a} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \cot ^{2}{\relax (x )}} \tan ^{4}{\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________